<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

	<head>
		<title>产品查询</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link href="../css/style.css" rel="stylesheet" type="text/css">
		<link href="../css/layui.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="../../js/vue.min.js"></script>
		<script src="../../js/layui/layui.js"></script>
		<script src="../script/common.js"></script>
	</head>

	<body>
		<div class="page_title">产品查询</div>
		<div class="button_bar">
			<button class="layui-btn layui-btn-normal" onclick="help('');">帮助</button>
			<button class="layui-btn layui-btn-normal" onclick="reload();">查询</button>
		</div>
		<div id="app" class="layui-form">

			<table class="query_form_table">
				<tr>
					<th>名称</th>
					<td><input type="text" class="layui-input"></td>
					<th>型号</th>
					<td><input type="text" class="layui-input"></td>
					<th>批次</th>
					<td><input type="text" class="layui-input"></td>
				</tr>
			</table>
			<br />
			<table class="layui-table">
				<tr>
					<th>编号</th>
					<th>名称</th>
					<th>型号</th>
					<th>等级/批次</th>
					<th>单位</th>
					<th>单价（元）</th>
					<th>备注</th>
				</tr>
				<tr>
					<td class="list_data_number">1</td>
					<td class="list_data_ltext">幸福牌电视机</td>
					<td class="list_data_text">818 FFT</td>
					<td class="list_data_text">2388 EA03</td>
					<td class="list_data_text">台</td>
					<td class="list_data_number">7500</td>
					<td class="list_data_ltext">代生产&nbsp;</td>
				</tr>
				<tr>
					<td class="list_data_number">2</td>
					<td class="list_data_ltext">幸福牌收音机</td>
					<td class="list_data_text">天语007</td>
					<td class="list_data_text">7878 006A</td>
					<td class="list_data_text">台</td>
					<td class="list_data_number">36</td>
					<td class="list_data_ltext">代生产&nbsp;</td>
				</tr>
				<tr>
					<td class="list_data_number">3</td>
					<td class="list_data_ltext">海龙笔记本电脑</td>
					<td class="list_data_text">i60 </td>
					<td class="list_data_text">2688 9966</td>
					<td class="list_data_text">台</td>
					<td class="list_data_number">9800</td>
					<td class="list_data_ltext">&nbsp;</td>
				</tr>
				<tr>
					<td class="list_data_number">4</td>
					<td class="list_data_ltext">海龙笔记本电脑</td>
					<td class="list_data_text">i61 </td>
					<td class="list_data_text">2689 6688</td>
					<td class="list_data_text">台</td>
					<td class="list_data_number">16800</td>
					<td class="list_data_ltext">&nbsp;</td>
				</tr>
				<tr>
					<td class="list_data_number">5</td>
					<td class="list_data_ltext">海龙笔记本电脑</td>
					<td class="list_data_text">i61 </td>
					<td class="list_data_text">2689 6689</td>
					<td class="list_data_text">台</td>
					<td class="list_data_number">15800</td>
					<td class="list_data_ltext">&nbsp;</td>
				</tr>
			</table>
			<div class="change_page" style="float: right; margin-right: 20px;">
				<table lay-skin="nob">
					<tr>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('1')">首页</button></td>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('-')">上一页</button>&nbsp;&nbsp;</td>
						<td>
							<input type="text" required lay-verify="required" class="layui-input" style="width: 30px;" v-model="pages">
						</td>
						<td>
							<label>/{{sumpages}}</label>
							<button class="layui-btn layui-btn-primary" v-on:click="querypage('0')">跳转</button>
						</td>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('+')">下一页</button></td>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('2')">末页</button></td>
					</tr>
				</table>
			</div>
		</div>
	</body>

</html>
<script>
	layui.use(['form', 'laydate'], function() {
		var form = layui.form;
		var laydate = layui.laydate;
	});
</script>
<script>
	function changes(str) {
		parent.document.getElementById("mywork").src = str;
	}
	new Vue({
		el: "#app",
		data: {
			pages: 1,
			sumpages: 25
		},
		methods: {
			querypage: function(str) {
				var pages = this.pages;
				switch(str) {
					case '+':
						if(eval(pages + "+" + 1) <= this.sumpages) {
							this.pages = eval(pages + "+" + 1);
						}
						break;
					case '-':
						if(eval(pages + "-" + 1) >= 1) {
							this.pages = eval(pages + "-" + 1);
						}
						break;
					case '0':
						break;
					case '1':
						this.pages = 1;
						break;
					case '2':
						this.pages = this.sumpages;
						break;
					default:
						break;
				}
			}
		}
	})
</script>